package view;

import java.awt.Cursor;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.Timer;

import model.Core;
import controller.KeyboardInput;

public class Frame extends JFrame
{
	private static final long serialVersionUID = 2773168040909497332L;	
	
	public Frame()
	{
		this.setTitle("The Game");
		this.setSize(new Dimension(640,480));
		this.setResizable(false);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		Cursor c = new Cursor(Cursor.CROSSHAIR_CURSOR);
		//Cursor c = Toolkit.getDefaultToolkit().createCustomCursor(cursor, hotSpot, name);
		this.setCursor(c);
		
		View view = new View();
		Timer timer = new Timer(50, view);
		
		Core core = new Core(view);
		new KeyboardInput(core);

		timer.start();
		this.add(view);
			
		this.setVisible(true);
	}
	
	public static void main(String[] args)
	{
		new Frame();
	}
}
